<%@ taglib prefix="c" uri="/WEB-INF/tlds/hdiv-c.tld"%>
<%@ taglib prefix="form" uri="/WEB-INF/tlds/hdiv-spring-form-3_0_4.tld"%>
<%@ taglib prefix="spring" uri="/WEB-INF/tlds/hdiv-spring.tld" %>
<%@ taglib prefix="display" uri="http://displaytag.sf.net" %>

<c:url value="mostrarHWF1007.html" var="configArchivosIndicadores"/>

    <script type="text/javascript" language="JavaScript" src="javascript/HMF1007.js"></script>
    <script type="text/javascript">
    
    $(document).ready(function(){ 
        
        $('span.pagelinks>a, table#dispTable>thead>tr>th>a').live('click', function(){
            $.get($(this).attr('href'), function(responseText, status, xmlHttpRequest){
                $('#displayTagDiv').html($('#displayTagDiv', responseText).html());
                }
            )            
            return false;
        });
       
        });
        
        function mostrar(){
            //show_loading();
            $.get("<c:url value='mostrarHWF1007.html'/>",{accion:"mostrarTiposArchivo",desTipoArchivo:$('#reporte').val()}, function(responseText, status, xmlHttpRequest){
                $('#displayTagDiv').html($('#displayTagDiv', responseText).html());
                document.getElementById('loading_mostrar').style.display = 'none';  
            });     
        }
        
        function cursor_wait() {
          document.body.style.cursor = 'wait';
        }
        
        function show_loading(){  
            var loadingAnim = document.getElementById('loading_mostrar');  
            loadingAnim.innerHTML = '<img src="imagenes/logoProcesandoRight.gif" width=' + xx_r + 'height=' + yy_r + 'alt="Procesando" />';  
            loadingAnim.style.display = 'block';      
        }
        
    function setChkTipoArch(checkObj){
        var idChkObj = checkObj.checked;
        if(idChkObj){
            $.getJSON("<c:url value='mostrarHWF1007.html'/>", {accion : "selectTipoArch",codReporte: checkObj.value});
        }else{
            $.getJSON("<c:url value='mostrarHWF1007.html'/>", {accion : "deselectTipoArch",codReporte: checkObj.value});
        }        
    }   
      
    function setChkTodos(checkTodos){
        var booCheckTodos = "Check Object: "+ checkTodos.checked;
        $.get("<c:url value='mostrarHWF1007.html'/>",{accion:"selectTodos",codTodos:checkTodos.checked}, function(responseText, status, xmlHttpRequest){
            $('#displayTagDiv').html($('#displayTagDiv', responseText).html());
            }
        )        
    }
    
    function aceptar(){
        $.get("<c:url value='mostrarHWF1007.html'/>",{accion:"guardarSelecTiposArch"}, function(responseText, status, xmlHttpRequest){
            self.close();
            }
        )   
    }
        
        
        
    </script>

<style type="text/css">  
<!-- 
#loading_mostrar {display:none;}  
-->  
</style> 

<form:form modelAttribute="form" action="${configArchivosIndicadores}">
<form:hidden path="cliente"/>
<table id="fullheighttable" width="100%" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td align="left" valign="top" class="fondo_contenido padtop16left21">
      <table border="0" cellspacing="0" cellpadding="0" class="verdana11bazul">
      <tr>
        <td height="22" align="left" valign="top" class="verdana11bazul">
		<ul class="navlist2">
		<li>REPORTES INDICADORES </li>
		</ul>
        </td>
        <td width = "350"></td>
        
      </tr>
      <tr>
        <td align="center" valign="middle" class="borde_totalblanco">
        
        <table border="0" cellspacing="0" cellpadding="5">
           
          <tr>
            <td height="34" width="60" align="left" valign="middle" class="verdana10bazul">
                Reporte</td>
            <td height="15" align="left" valign="middle" class="verdana10negro">
                <table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="left" valign="middle" class="padright10"><div class="fondo_txtbox180">
                        &nbsp;<form:input path="reporte" size="32" readonly="false"/>
                      </div></td>
                      <td>&nbsp;</td>
                    </tr>
                </table>
            </td>
            <td>
                <input name="Submit2" type="button" class="boton" value="Mostrar" onclick="javascript:mostrar();">
            </td>
          </tr> 
        </table>
        </td>
      </tr>
      </table>
      <table border="0" cellpadding="0" cellspacing="0" class="margintop20" width="98%">
        <tr>
                <td colspan="2" align="center">    
                <div id="loading_mostrar"><img id="logoRight" src="imagenes/logoProcesandoRight.gif" alt="Procesando" /></div>  
                </td>
        </tr>
        <tr >
          <td>
            <input type='checkbox' id='chkTodos' onclick='setChkTodos(this)'/> Todos    
            <div id="displayTagDiv">
              <display:table id="tipoArchInd" name="listaTipoArchInd" cellpadding="0"
                             cellspacing="0" style="width:100%" pagesize="10"
                             export = "false"
                             requestURI="${configArchivosIndicadores}"
                             class="its">
               <tbody>
               <display:column title="Sel" style="width:'1%';">
                                <input type="checkbox" id="_chk${tipoArchInd.codReporte}" name="_chk" value="${tipoArchInd.codReporte}" onclick="setChkTipoArch(this);" ${tipoArchInd.chkMarca}/>
                            </display:column> 
                <display:column property="desReporte"
                                headerClass="even"  style="width:'12%';" class="cellleft "
                                title="Estado"/>             
               </tbody>
              </display:table>
            <div>
          </td>
        </tr>
        <tr>
            <td>
              &nbsp;
            </td>
        </tr>
        <tr><td>&nbsp;</td>
        </tr> 
        <tr>
            <td align="center">
                <input name="btnAceptar" type="button" class="boton" value="Aceptar" onclick="javascript:aceptar();">
            </td>
        </tr>
        <tr><td>&nbsp;</td>
        </tr>            
      </table>
   </td>
  </tr>
</table>
</form:form> 